import request from '@/utils/request'

// 创建安全检查
export function createSafetyCheck(data) {
  return request({
    url: '/biz/safety-check/create',
    method: 'post',
    data: data
  })
}

// 更新安全检查
export function updateSafetyCheck(data) {
  return request({
    url: '/biz/safety-check/update',
    method: 'put',
    data: data
  })
}

// 删除安全检查
export function deleteSafetyCheck(id) {
  return request({
    url: '/biz/safety-check/delete?id=' + id,
    method: 'delete'
  })
}

// 获得安全检查
export function getSafetyCheck(id) {
  return request({
    url: '/biz/safety-check/get?id=' + id,
    method: 'get'
  })
}

// 获得安全检查分页
export function getSafetyCheckPage(query) {
  return request({
    url: '/biz/safety-check/page',
    method: 'get',
    params: query
  })
}

export function selectSafetyCheck(query) {
  return request({
    url: '/biz/safety-check/selectSafetyCheck',
    method: 'get',
    params: query
  })
}

// 导出安全检查 Excel
export function exportSafetyCheckExcel(query) {
  return request({
    url: '/biz/safety-check/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
